import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:interview/config/app.enum.dart';
import 'package:interview/theme/app_colors.dart';

class LoginWays extends StatefulWidget {
  final AppColors theme;
  const LoginWays({super.key, required this.theme});

  @override
  State<LoginWays> createState() => _LoginWaysState();
}

class _LoginWaysState extends State<LoginWays> {
  final List<String> login_ways = [
    'ic_company_qq.svg',
    'ic_company_wb.svg',
    'ic_company_wechat.svg',
    'ic_company_red.svg',
    
  ];
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      padding: const EdgeInsets.symmetric(horizontal: 32),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        mainAxisSize: MainAxisSize.min,
        children: [
          Text("其他登录方式" , style: TextStyle(fontSize: 12 , color: widget.theme.contrastMix1 )),
          SizedBox(height: 24,),
          SizedBox(
            width: double.infinity,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisSize: MainAxisSize.min,
              children: List.generate(login_ways.length, (index){
                final item = login_ways[index];
                return  SvgPicture.asset("${AppEnumAssets.basePath}$item" , width: 24 , height: 24,);
              }),
            ),
          )
        ],
      ),
    );
  }
}